#==============================================================================
# thread
#==============================================================================
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)

PROJECT(echo)

#------------------------------------------------------------------------------
INCLUDE_DIRECTORIES(
    ${PROJECT_SOURCE_DIR}
)

SET(echo_SRC
    EchoServerSocket.h
    EchoServerSocket.cc
    EchoServerSocketFactory.h
    EchoServerStatics.h
    
    Main.cc
)

#------------------------------------------------------------------------------
ADD_EXECUTABLE(echo ${echo_SRC})
TARGET_LINK_LIBRARIES(echo yxs)

IF(WIN32)
TARGET_LINK_LIBRARIES(echo libevent ws2_32)
ELSE()
TARGET_LINK_LIBRARIES(echo pthread event)
ENDIF()
